package com.foruo.learn.designmode.memo;

import java.util.ArrayList;
import java.util.List;

/**
 * 备忘录类
 * 用于存储历史状态
 * @author GaoYuan
 * @date 2018/11/13 上午8:25
 */
public class MemoManager {

    private List<Memo> stateList = new ArrayList();

    public void add(Memo state){
        stateList.add(state);
    }

    public Memo get(int index){
        return stateList.get(index);
    }

}
